<template>
  <!--待审批.zjr-->
  <div class="examine">
    <!--  -->
    <table-box :table-config="tableConfig" />
  </div>
</template>
<script>
export default {
  name: 'Examine',
  data() {
    const that = this
    return {
      tableConfig: {
        interfacePath: '/ucenter/api/toDo/page/2',
        setting: [
          {
            prop: 'applicationName',
            label: '来源'
          },
          {
            prop: 'title',
            label: '待审批',
            render: function(createElement, row) {
              let ifText
              if (row.isTimeOut) {
                ifText = <label class='tag'>超时</label>
              }
              return (<div>
                <el-button nativeOnClick={that.viewDetail.bind(this, row)} type='text'>[查看]</el-button>
                {ifText}
                {row.title}
              </div>
              )
            }
          },
          {
            prop: 'createTime',
            label: '时间'
          }
        ]
      }
    }
  },
  methods: {
    viewDetail(row) {
      this.$router.push(`/myiframe/urlPath?src=${row.linkUrl}`)
    }
  }
}
</script>
<style lang="scss" scoped>
  .examine {
    padding: 12px 12px 0 12px;
    background: #fff;
    height: 100%;
  }

  .tag {
    width: 36px;
    height: 16px;
    background:rgba(241,86,67,.1);
    color: #F15643;
    font-weight:400;
    font-size:12px;
    padding: 3px 6px;
    margin-right: 5px;
  }
</style>
